﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orchard.ContentManagement;
using Dyn.News.ViewModels;

namespace Dyn.News.Models
{
    public class NewsCategoryMenuWidgetPart: ContentPart<NewsCategoryMenuWidgetPartRecord>
    {
        public IEnumerable<NewsCategoryPartRecord> ContentCategoryMenuWidgets
        {
            get { return Record.ContentCategoryMenuWidgets.OrderBy(o => o.DisplayOrder).Select(p => p.NewsCategoryPartRecord); }
        }
        //List Category | Trong category widget
        public IEnumerable<ContentCategoryMenuWidgetViewModel> CategoryMenus { get; set; }
    }
}
